/*
 * To change this license header, choose License Headers in Project Properties.
 * To change this template file, choose Tools | Templates
 * and open the template in the editor.
 */
package STUDENT.NGUYENSANG.OOPs.QuanLiThuVien;

/**
 *
 * @author NSPDL
 */
public class Sach implements UserFile{
    private int MaSach;
    private String TenSach;
    private String TacGia;
    private String NamXB;
    private String ChuyenNganh;

    public Sach(int MaSach, String TenSach, String TacGia, String NamXB, String ChuyenNganh) {
        this.MaSach = MaSach;
        this.TenSach = TenSach;
        this.TacGia = TacGia;
        this.NamXB = NamXB;
        this.ChuyenNganh = ChuyenNganh;
    }

    public int getMaSach() {
        return MaSach;
    }

    public void setMaSach(int MaSach) {
        this.MaSach = MaSach;
    }

    public String getTenSach() {
        return TenSach;
    }

    public void setTenSach(String TenSach) {
        this.TenSach = TenSach;
    }

    public String getTacGia() {
        return TacGia;
    }

    public void setTacGia(String TacGia) {
        this.TacGia = TacGia;
    }

    public String getNamXB() {
        return NamXB;
    }

    public void setNamXB(String NamXB) {
        this.NamXB = NamXB;
    }

    public String getChuyenNganh() {
        return ChuyenNganh;
    }

    public void setChuyenNganh(String ChuyenNganh) {
        this.ChuyenNganh = ChuyenNganh;
    }
     @Override
    public Object[] toObject() {
     return new Object[]{MaSach,TenSach,TacGia,NamXB,ChuyenNganh};
    }
    @Override
    public String toString()
    {
        return (""+this.getMaSach()+" "+this.getTenSach()+" "+this.getTacGia()+" "+this.getNamXB()+" "+this.getChuyenNganh());
    }
}
